]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Add a 'screen' property to ShellGlobal
authorOwen Taylor <otaylor@src.gnome.org>
Wed, 19 Nov 2008 22:54:42 +0000 (22:54 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 19 Nov 2008 22:54:42 +0000 (22:54 +0000)
Add a screen property to ShellGlobal so Javascript code can get
access to the MetaScreen.

http://bugzilla.gnome.org/show_bug.cgi?id=561297

svn path=/trunk/; revision=61

src/shell-global.c

index 1a186bafebc6b6324613e533a8d8f8edd83ef9ad..4652e92fe736dd6b45de336770bc59877300d590 100644 (file)
@@ -15,6 +15,7 @@ enum {
   PROP_0,
 
   PROP_OVERLAY_GROUP,
+  PROP_SCREEN,
   PROP_SCREEN_WIDTH,
   PROP_SCREEN_HEIGHT,
   PROP_STAGE,
@@ -60,6 +61,9 @@ shell_global_get_property(GObject         *object,
     case PROP_OVERLAY_GROUP:
       g_value_set_object (value, mutter_plugin_get_overlay_group (global->plugin));
       break;
+    case PROP_SCREEN:
+      g_value_set_object (value, mutter_plugin_get_screen (global->plugin));
+      break;
     case PROP_SCREEN_WIDTH:
       {
         int width, height;
@@ -126,6 +130,13 @@ shell_global_class_init (ShellGlobalClass *klass)
                                                         "Actor holding objects that appear above the desktop contents",
                                                         CLUTTER_TYPE_ACTOR,
                                                         G_PARAM_READABLE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_SCREEN,
+                                   g_param_spec_object ("screen",
+                                                        "Screen",
+                                                        "Metacity screen object for the shell",
+                                                        META_TYPE_SCREEN,
+                                                        G_PARAM_READABLE));
   g_object_class_install_property (gobject_class,
                                    PROP_SCREEN_WIDTH,
                                    g_param_spec_int ("screen-width",